#ifndef STM32_H
#define STM32_H

#include <QLayoutItem>
#include <QDialog>
#include "slideswitch.h"
#include <QDebug>
#include <QBoxLayout>
#include <QJsonObject>
#include <QJsonArray>
#include <QLabel>
#include <QMap>
#include <QJsonDocument>
#include <QPixmap>
#include "mqtt/qmqtt.h"
#include "globalval.h"
namespace Ui {
class Stm32;
}

class Stm32 : public QDialog
{
    Q_OBJECT

public:
    explicit Stm32(QWidget *parent = 0);
    ~Stm32();
    void switchChangeSlot(bool checked);
    void createSlideSwitch(QBoxLayout *layout, int keyValue, QLabel *QLabel);
    void switchCtlToUi(QJsonObject jsonData);

private:
    Ui::Stm32 *ui;
    QMap<int,SlideSwitch*> slideMap;
    QMap<int,QLabel*> labelMap;
    QMap<int, QString> pngMap;
    QMap<int, QString> pngOnMap;
};

#endif // STM32_H
